package com.pzl.dao;

import com.pzl.domain.User;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Service;

import javax.jws.soap.SOAPBinding;
import java.util.List;

/**
 * UserDao class
 *
 * @Author panzhenglei
 * @Date 2019/6/14 6:38 PM
 */
public interface UserDao {


        @Select("select * from User")
        List<User> findAll();

        @Select("select * from user where id = #{id}")
        User findByID(Integer id);

        /*private Integer id;
            private Integer age;
            private String username;
            private String password;
            private String email;
            private String sex;*/

        @Update("update user set age = #{age},username = #{username},password = #{password},email = #{email},sex = #{sex} where id = #{id}")
        void update(User user);

}
